#include"Common.h"

class Mutex
{
public:
    Mutex()
    {
        pthread_mutex_init(&_mtx, nullptr);
    }
    void lock()
    {
        pthread_mutex_lock(&_mtx);
    }
    void unlock()
    {
        pthread_mutex_unlock(&_mtx);
    }
    ~Mutex()
    {
        pthread_mutex_destroy(&_mtx);
    }
private:
    pthread_mutex_t _mtx;
};